local sk__tianzi = fk.CreateSkill {

  name = "sk__tianzi",

  tags = { Skill.Compulsory, },

}



sk__tianzi:addEffect(fk.DrawNCards, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(sk__tianzi.name) and #player.room:getOtherPlayers(player) > 0
  end,
  on_use = function(self, event, target, player, data)
    data.n = data.n + #player.room:getOtherPlayers(player)
  end,
})

sk__tianzi:addEffect("maxcards", {
  name = "#sk__tianzi_maxcards",
  correct_func = function(self, player)
    if player:hasSkill(sk__tianzi.name) then
      return #table.filter(Fk:currentRoom().alive_players, function (p)
        return p ~= player
      end)
    end
  end,
})

return sk__tianzi